phrase ='don\'t panic!'
#字符串转列表
plist=list(phrase)
print(plist)
print(phrase)

for i in range(4):
    plist.pop()
plist.pop(0);
plist.remove('\'')
plist.extend([plist.pop(),plist.pop()])
plist.insert(2,plist.pop(3))

#列表转回字符串
phrase2=''.join(plist)
print(plist)
print(phrase2)